<?php
// Make sure SimplePie is included. You may need to change this to match the location of simplepie.inc.
require_once('rss_php.php');
 
$rss = new rss_php;
$rss->load('http://www.teamliquid.net/rss/news.xml');
$items = $rss->getItems(); #returns all rss items
 
$html = '';
$html .= <<<EOHTML
<div style="width:290px; border: solid 2px #0a7dcb; padding:5px; float:left; margin-left:6px; text-align:left; direction:ltr; height:100%;">
Teamliquid News
<hr>
EOHTML;
$counter = 1;
    
foreach ($items as $item){
	$counter++;
	$html .= <<<EOHTML
		{$item['author']} <br />
		{$item['pubDate']} <br />
		<a href="{$item['link']}" target="_blank"> {$item['title']} </a><br />
		<hr />
EOHTML;
	if($counter == 8) break;
}

$html .= <<<EOHTML
</div>
EOHTML;

echo $html;